<?php
/*
Template Name: Full Nice
*/
?>
<?php get_header_news(); ?>

<div class="outer" id="contentwrap">


    <div id="content" class="dep fun">
        <div class="contentleft">
            <div class="modslidecontentcate mod">
                <div id="featured" >
                    <ul class="ui-tabs-nav">
                        <?php
                        global $post;
                        $i=1;$j=1;
                        $args = array( 'numberposts' => 4, 'category' =>  $cat_id );
                        $myposts = get_posts( $args );
                        foreach( $myposts as $post ) :	setup_postdata($post);
                            ?>
                            <li class="ui-tabs-nav-item" id="nav-fragment-<?php echo $i++;?>">
                                <a href="#fragment-<?php echo $j++;?>" title="<?php the_title_attribute(); ?>" >
                                    <?php if ( has_post_thumbnail()) : ?>
                                    <?php the_post_thumbnail('medium', array()); ?>
                                    <?php else:?>
                                    <img src="<?php echo catch_that_image() ?>" alt="<?php the_title(); ?>" />
                                    <?php endif; ?>
                                    <span><?php the_title(); ?></span>
                                </a>
                            </li>
                            <?php endforeach;?>
                    </ul>
                    <?php
                    global $post;
                    $k=1;
                    $args = array( 'numberposts' => 4, 'category' =>  $cat_id );
                    $myposts = get_posts( $args );
                    foreach( $myposts as $post ) :	setup_postdata($post);
                        ?>
                        <div id="fragment-<?php echo $k++?>" class="ui-tabs-panel" style="">
                            <?php if ( has_post_thumbnail()) : ?>
                            <?php the_post_thumbnail('medium', array('class' => 'alignleft')); ?>
                            <?php else:?>
                            <img src="<?php echo catch_that_image() ?>" alt="<?php the_title(); ?>" />
                            <?php endif; ?>
                            <div class="info" >
                                <h2><a href="<?php the_permalink(); ?>" ><?php the_title(); ?></a></h2>
                                <p><?php the_content_index(); ?><a href="<?php the_permalink(); ?>" >xem chi tiết</a></p>
                            </div>
                        </div>
                        <?php endforeach;?>

                </div>
            </div>
            <!--End slider-->
            <?php $this_cat = (get_query_var('cat')) ? get_query_var('cat') : 1; ?>
            <?php $categories =  get_categories('child_of='.$this_cat) ?>
            <?php $o = 0;?>
            <?php foreach($categories as $category):?>


            <?php if($o == 0) :?>
                <div class="listcol1 listcontentofcate mod">
                <?php elseif($o == 1) :?>
                    <div class="listcol2 listcontentofcate mod">
                <?php endif;?>

            <h1 class="titlemod"></h1>
            <ul>
                <?php foreach(get_posts('cat='.$category->term_id) as $post) :?>
                <?php setup_postdata($post);?>
                <li>
                    <a href="<?php the_permalink();?>"><?php if ( has_post_thumbnail()) : ?>
                        <?php the_post_thumbnail(); ?>
                        <?php else:?>
                        <img src="<?php echo catch_that_image() ?>" alt="<?php the_title(); ?>" />
                        <?php endif; ?></a>
                    <a href="<?php the_permalink();?>"><?php the_title();?></a>
                    <p><?php the_content_index();?></p>
                </li>
                <?php endforeach;?>


                <div class="clr"></div>
            </ul>

            <a class="viewmore" href="<?php echo get_category_link($category->term_id);?>">Xem thêm</a>
                </div>

                <?php $o++; endforeach;?>
            <?php comments_template(); ?>
            <!--End column left-->
</div>

        <div class="contentright">
            <div class="modimage3 mod"><a href="#"><img src="upload/rightadsimg1.png" width="250"  height="280" /></a></div>

            <div class="modmostvideo mod">
                <h1></h1>
                <p>
                <iframe width="251" height="188" src="http://www.youtube.com/embed/QX5xZ7aVtWk?rel=0" frameborder="0" allowfullscreen></iframe>
                <a href="#">Morbi sit amet nisl sed felis luctus gravida. Pellentesque euissed.</a>
                <a href="#">Morbi sit amet nisl sed felis luctus gra via. Pellentesque euissed.</a>
                <a href="#">Aliquam ultrices augue in leo gravida facilisis. Mauris eleifen in vestibulum</a>
                </p>
                <div class="clr"></div>
            </div>

            <div class="topcontcate mod2 mod">
                <h1></h1>
                <ul>
                    <li><a href="#"><img src="upload/img4.png" />Nam neque ipsum, ultrices in ligula eu, tristique molestie quam</a></li>
                    <li><a href="#"><img src="upload/img5.png" />Pellentesque habitant morbi tristique</a></li>
                    <li><a href="#"><img src="upload/img6.png" />Quisque vitae orci vel arcu eleifend pretium. Cras nec orci quis justo </a></li>
                    <li><a href="#"><img src="upload/img7.png" />Cras nec orci quis justo </a></li>
                    <li><a href="#"><img src="upload/img8.png" />Nam neque ipsum, ultrices in ligula eu, tristique molestie quam</a></li>
                </ul>
            </div>

            <div class="modimage4 mod"><a href="#"><img src="upload/rightadsimg3.png" width="250"/></a></div>
        </div>
        <!-- End column right-->

        <div class="contentright">
            <div class="topcontcate mod1 mod">
                <h1></h1>
                <ul>
                    <li><a href="#"><img src="upload/img8.png" />Nam neque ipsum, ultrices in ligula eu, tristique molestie quam</a></li>
                    <li><a href="#"><img src="upload/img9.png" />Pellentesque habitant morbi tristique</a></li>
                    <li><a href="#"><img src="upload/img10.png" />Quisque vitae orci vel arcu eleifend pretium. Cras nec orci quis justo </a></li>
                    <li><a href="#"><img src="upload/img11.png" />Cras nec orci quis justo </a></li>
                    <li><a href="#"><img src="upload/img4.png" />Nam neque ipsum, ultrices in ligula eu, tristique molestie quam</a></li>
                </ul>
            </div>

            <div class="modimage4 mod"><a href="#"><img src="upload/rightadsimg4.png" width="250"/></a></div>

            <div class="modimage4 mod"><a href="#"><img src="upload/rightadsimg5.png" width="250"/></a></div>

        </div>
        <!-- End column right-->
        <div class="clr"></div>
    </div>

</div>
<?php get_footer(); ?>